/*
车载软件设计基础
课后实践2
*/

#include <iostream>
#include "display_manager.h"
#include "distribution_manager.h"
#include "file_manager.h"
#include "info_enter_manager.h"

int main() {
    const int CAR_NUMBER = 2;

    // 信息录入模块
    InfoEnterManager enterMngr(CAR_NUMBER);
    enterMngr.enterInfo();

    // 分配模块
    DistributionManager distrMngr(CAR_NUMBER);
    distrMngr.setCars(enterMngr.getSmartCars());
    distrMngr.setStuents(enterMngr.getStudents());
    distrMngr.assignStudent();

    // 文件管理模块
    FileManager fileMngr(CAR_NUMBER);
    fileMngr.setCars(distrMngr.getDistributionCars());
    fileMngr.saveToFile("data");
    fileMngr.loadFromFile("data");

    // 显示模块
    DisplayManager displayMngr(CAR_NUMBER, fileMngr.getSmartCars());
    displayMngr.display();
    return 0;
}